<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@include file="/common/common.jspf"%>
<script type="text/javascript" src="${ctx}/js/system/user/add.js">
	
</script>
<style type="text/css">
.col-sm-3 {
	width: 15%;
	float: left;
	position: relative;
	top: 9px;
	text-align: right;
}


.col-sm-9 {
	width: 32%;
	float: left;
	text-align: left;
}


label[class^="btn btn-default"] {
	margin-top: -4px;
}
</style>
</head>
<body>
	<div class="l_err" style="width: 100%; margin-top: 2px;"></div>
	<form id="form" name="form" class="form-horizontal" method="post"
		action="${ctx}/workOrder/addWorkOrder.shtml">
		<section class="panel panel-default">
		<div class="panel-body">
			<div class="form-group">
				<div class="col-sm-3">
					<label class="control-label">工单编号</label>
				</div>
				<div class="col-sm-9">
					<input type="text" class="form-control"
						   name="worKOrderFormMap.bpcode" id="bpcode" value="${user.bpcode}">

				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label">工艺名称</label>
					<div class="col-sm-9">
						<input type="text" class="form-control"
							   name="worKOrderFormMap.bpname"
							   id="bpname" value="aaa">
					</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">车间</label>
				<div class="col-sm-9">
					<select class="form-control" name="worKOrderFormMap.depid" id="depid">
						<c:forEach items="${dep}" var="d">
							<c:choose>
								<c:when test="${d.deid == user.bpedemid}">
									<option value="${d.deid}" selected="selected">${d.dename}</option>
								</c:when>

								<c:otherwise>
									<option value="${d.deid}">${d.dename}</option>
								</c:otherwise>
							</c:choose>

						</c:forEach>

					</select>
				</div>

				<div class="form-group">
					<label class="col-sm-3 control-label">客户名称</label>
					<div class="col-sm-9">
						<select class="form-control" name="worKOrderFormMap.ipstockid" id="ipstockid">
							<c:forEach items="${client}" var="cl">
								<c:choose>
									<c:when test="${cl.clientId == user.bpclient}">
										<option value="${cl.clientId}" selected="selected">${cl.clientComName}</option>
									</c:when>
									<c:otherwise>
										<option value="${cl.clientId}" >${cl.clientComName}</option>
									</c:otherwise>
								</c:choose>

							</c:forEach>
						</select>
					</div>
				</div>
			</div>

			<div class="form-group">
				<label class="col-sm-3 control-label">编制人</label>
				<div class="col-sm-9">
					<select class="form-control" name="worKOrderFormMap.bpedemid" id="bpedemid">
						<c:forEach items="${emp}" var="e">
							<c:choose>
								<c:when test="${e.empId == user.bpclient }">
									<option value="${e.empId}" selected="selected">${e.empName}</option>
								</c:when>
								<c:otherwise>
									<option value="${e.empId}">${e.empName}</option>
								</c:otherwise>
							</c:choose>
						</c:forEach>
					</select>
				</div>


				<div class="form-group">
					<label class="col-sm-3 control-label">生产状态</label>
					<div class="col-sm-9">
						<select class="form-control" name="worKOrderFormMap.bpbillstateid" id="bpbillstateid">
							<option value="1">完成</option>
							<option value="2">未完成</option>
						</select>
					</div>
				</div>


			</div>

            <div class="form-group">
                <label class="col-sm-3 control-label">生产日期</label>
                <div class="col-sm-9">
					<input type="date" class="form-control"
						   name="worKOrderFormMap.bpbtime"
						   id="bpbtime" value="${user.bpcode}">
                </div>

                <div class="form-group">
                    <label class="col-sm-3 control-label">完成日期</label>
                    <div class="col-sm-9">
                        <input type="date" class="form-control"
                               name="worKOrderFormMap.bpetime"
                               id="bpetime">
                    </div>
                </div>
            </div>


		<footer class="panel-footer text-right bg-light lter">
		<button type="submit" class="btn btn-success btn-s-xs">提交</button>
		</footer>
		</section>
	</form>

	<script type="text/javascript">
		onloadurl();
	</script>
	<script type="text/javascript"
		src="${ctx}/notebook/notebook_files/bootstrap-filestyle.min.js"></script>
</body>
</html>